<!--
Copyright 2003 Cordys R&D B.V. 

This file is part of the Cordys SAP Connector. 

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Project  : Cordys BAC
Description : To explore the metadat of SAP backend
author : Vijaya Gopal
-->
<html xmlns:eibus onselect="selectApplication()">
<head>	
	<link rel="stylesheet" type="text/css" href="/cordys/wcp/style/behaviors.css">
	<script src = "/cordys/wcp/xml/xml.js"></script>	
	<script language = "JScript">
	function selectApplication()
	{				
		var paramObject = window.event.data;		
		var parentWindow = window.system.windows[paramObject.parentID];					
		var bdiUsed = parentWindow.bdiSAP;		
		bdiUsed.parameters.receiver = paramObject.soapNodeDN;		
		var requestToBeSent;
		var xPath;	
		if(paramObject.itemType == "IDOCType")
		{			
			requestToBeSent = reqGetIDOCInterface.XMLDocument.cloneNode(true);			
			requestToBeSent.selectSingleNode("SOAP:Envelope/SOAP:Body/GetIDOCInterface/IDOCType").text = paramObject.itemName;
			requestToBeSent.selectSingleNode("SOAP:Envelope/SOAP:Body/GetIDOCInterface/CIMType").text = paramObject.extension;			
			xPath = "data/GetIDOCInterfaceResponse/tuple/old/IDOCInterface" ;
		}
		else
		{			
			requestToBeSent = reqGetRFCInterface.XMLDocument.cloneNode(true);			
			requestToBeSent.selectSingleNode("SOAP:Envelope/SOAP:Body/GetRFCInterface/RFCName").text = paramObject.itemName;			
			xPath = "data/GetRFCInterfaceResponse/tuple/old/RFCInterface" ;
		}
		bdiUsed.clear();								
		bdiUsed.request = requestToBeSent;
		parentWindow.flag_SoapFault = false ;				
		bdiUsed.reset();				
		if(parentWindow.flag_SoapFault == false)
		{		
			var nodeToBeDisplayed = bdiUsed.data.selectSingleNode(xPath);							
			xml2html(nodeToBeDisplayed, div_interface);			
		}			
	}
	</script>
</head>
<xml id="reqGetRFCInterface">
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <GetRFCInterface xmlns="http://schemas.cordys.com/1.0/SAPSchema">
		<RFCName/>
		<overwrite>false</overwrite>
    </GetRFCInterface>
  </SOAP:Body>
</SOAP:Envelope>
</xml>
<xml id="reqGetIDOCInterface">
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <GetIDOCInterface xmlns="http://schemas.cordys.com/1.0/SAPSchema">
		<IDOCType/>
		<CIMType/>
		<overwrite>false</overwrite>
    </GetIDOCInterface>
  </SOAP:Body>
</SOAP:Envelope>
</xml>
<body>
	<div id="div_interface" style="height:100%;width:100%;overflow:auto"></div>
</body>
</html>
